package wishes;

import enums.WishType;
import model.Model;
import interfaces.AbstractWish;

public class WishToPlay extends AbstractWish {

	public WishToPlay(long startTime) {
		super(startTime);
	}

	@Override
	public boolean canBeFulfilled() {
		return true;
	}

	@Override
	public boolean fulfill() {
		// Spielen
		return Model.getInstance().getWishes().remove(this);
	}

	@Override
	public long getDeadLine() {
		return startTime + Model.ZEIT_STUNDE * 3;
	}

	@Override
	public WishType getType() {
		return WishType.WishToPlay;
	}

	public String toString() {
		StringBuilder builder = new StringBuilder();
		//		long time = getDeadLine() - System.currentTimeMillis();
		//		builder.append(time > 0 ?  Model.millisToString(time) : "abgelaufen" );
		builder.append("bis ").append(Model.millisToString(getDeadLine()));
		builder.append(" >> Will spielen");
		return builder.toString();
	}
}
